I have code of the form
where zxcv is undefined. Mata insists on looking in the else block, breaking my program. Is there some analogous code that I should be using here? (My real code is a little more complicated than this, with if () actually checking something, and some manipulations of zxcv being done before assignment to d.)
Aside. This is quite infuriating and unexpected behavior. Mata does not need to look in the else block at all to evaluate my code. And the only workaround I can think of is coming up with dummy values for the zxcv object.
Code:
if (1){ d = 1 } else { d = zxcv }
Aside. This is quite infuriating and unexpected behavior. Mata does not need to look in the else block at all to evaluate my code. And the only workaround I can think of is coming up with dummy values for the zxcv object.
Comment